﻿<?xml version="1.0" encoding="utf-8" ?>
<Page xmlns="http://www.baojiansoft.com/schemas/dynamicpage" ObjectId="OrganizationManagement" Type="BaoJianSoft.Platform.Web.DynamicPage.OrganizationManagement, BaoJianSoft.Platform">
	<Title>$Domain.Text$ $Resources.Membership.Management, BaoJianSoft.Web$</Title>
	<PermissionValue>$Domain.Value$Management</PermissionValue>
	<Panels>
		<QueryPanel Id="$Domain.Value$" HeaderText="$Resources.Membership.Query, BaoJianSoft.Web$ $Domain.Text$">
			<TextBox FieldName="OrganizationCode" Label="$Resources.Membership.OrganizationCode, BaoJianSoft.Web$: " />
			<TextBox FieldName="OrganizationName" Label="$Resources.Membership.OrganizationName, BaoJianSoft.Web$: " />
			<ComboBox FieldName="OrganizationTypeId" Editable="false" FieldValueType="System.Guid" ForceSelection="true" Label="$Resources.Membership.OrganizationTypeShortDesc, BaoJianSoft.Web$: ">
				<DynamicDataSource Root="Records" TextField="Name" ValueField="OrganizationTypeId" Url="/Services/OrganizationService.svc/json/FindOrganizationTypes/$Domain.Value$" />
			</ComboBox>
			<CheckBoxGroup FieldName="Status" Label="$Resources.Membership.Status, BaoJianSoft.Web$: " FieldValueType="BaoJianSoft.Platform.OrganizationStatus, BaoJianSoft.Platform">
				<Item Checked="true" Text="$Resources.Membership.Enabled, BaoJianSoft.Web$" Value="Enabled" />
				<Item Text="$Resources.Membership.Pending, BaoJianSoft.Web$" Value="Pending" />
				<Item Text="$Resources.Membership.Disabled, BaoJianSoft.Web$" Value="Disabled" />
			</CheckBoxGroup>
		</QueryPanel>

		<ButtonPanel Id="$Domain.Value$" ButtonAlignment="Left">
			<Button CommandArgument="New" Type="NewImage" ToolTip="$Resources.Membership.Add, BaoJianSoft.Web$" />
		</ButtonPanel>

		
		<GridViewPanel Id="$Domain.Value$"
			HeaderText="$Resources.Membership.QueryResults, BaoJianSoft.Web$"
			EntityName="$Domain.Text$"
			EnabledCheckBoxField="true"
			PageSize="25"
			PrimaryKeyFieldName="OrganizationId"
			DefaultSortField="OrganizationName"
			DefaultSortDirection="ASC">
			<ViewButton />
			<EditButton />
			<DeleteButton />
			<Fields>
				<Field FieldName="OrganizationCode" HeaderText="$Resources.Membership.OrganizationCode, BaoJianSoft.Web$" Width="80" />
				<Field FieldName="OrganizationName" HeaderText="$Resources.Membership.OrganizationName, BaoJianSoft.Web$" Width="120" />
				<Field FieldName="OrganizationTypeName" SortingFieldName="OrganizationType.Name" HeaderText="$Resources.Membership.OrganizationTypeShortDesc, BaoJianSoft.Web$" Width="120" />
				<Field FieldName="Properties[&quot;Contact&quot;]" HeaderText="$Resources.Membership.Contact, BaoJianSoft.Web$" Align="Center" Sortable="false" Hidden="true" />
				<Field FieldName="Properties[&quot;PhoneNo&quot;]" HeaderText="$Resources.Membership.PhoneNo, BaoJianSoft.Web$" Align="Center" Sortable="false" Hidden="true" />
				<Field FieldName="Status" HeaderText="$Resources.Membership.Status, BaoJianSoft.Web$" Width="60">
					<Transform-Switch>
						<Case Value="Enabled">&lt;span style='color:green'&gt;$Resources.Membership.Enabled, BaoJianSoft.Web$&lt;/span&gt;</Case>
						<Case Value="Pending">$Resources.Membership.Pending, BaoJianSoft.Web$</Case>
						<Case Value="Disabled">&lt;span style='color:red'&gt;$Resources.Membership.Disabled, BaoJianSoft.Web$&lt;/span&gt;</Case>
					</Transform-Switch>
				</Field>
				<Field FieldName="LastUpdatedBy" HeaderText="$Resources.Membership.ModifiedBy, BaoJianSoft.Web$" Align="Center" Hidden="true">
					<Transform-Callback Type="BaoJianSoft.Platform.Web.DynamicPage.GridViewFieldValueTransformCallback.ShowUserDisplayName, BaoJianSoft.Platform"/>
				</Field>
				<Field FieldName="LastUpdatedDate" HeaderText="$Resources.Membership.ModifiedOn, BaoJianSoft.Web$" Align="Center" Width="150" />
				<RowView FieldName="Description" />
			</Fields>
		</GridViewPanel>

		<DetailPanel Id="$Domain.Value$" HeaderText="$Domain.Text$ $Resources.Membership.Profile, BaoJianSoft.Web$" ShowMessageAfterSavedSuccessfully="false">
			<Type>BaoJianSoft.Platform.Web.DynamicPage.OrganizationDetailPanel, BaoJianSoft.Platform</Type>
			<SkinPath>~/Templates/Platform/Organization.ascx</SkinPath>
			<SaveButton />
			<CancelButton />
		</DetailPanel>
	</Panels>
</Page>